﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServiceStack.Redis;

namespace Redis_1
{
    class Program
    {
        static RedisClient client = new RedisClient("127.0.0.1", 6379);
        static void Main(string[] args)
        {

           
            //client.Set<string>("test", "我是设置键值对");
            //string str = client.Get<string>("test");

            //Console.WriteLine("获取数据:{0}", str);

            test model = new test() { uId=1, address="成都高新区", uName="小黑"};
            client.Set<test>("test", model);
            test str = client.Get<test>("test");
            Console.WriteLine("获取数据:{0}", str);
            Console.Read();
        }


    }

    public class test
    {
        public int uId { get; set; }
        public string uName { get; set; }
        public string address { get; set; }
    }
}
